<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<title>e网批发管理后台</title>
	<?php include("common/conn.php"); if($_SESSION['userid']==""){echo "<script>window.location.href='login.php';</script>";} 

	if($_GET['del']=="ok")
	{
		$area = array(); 
		$area= $_POST['checkbox'];
		var_dump($_POST['checkbox']);
		exit();
		foreach ($area as $k=>$v)
		{
			$srat1=mysql_query("DELETE FROM talks where id='".$v."'");
		}

	}


	$rert=mysql_query("select * from talks where  id='".$_GET['id']."'"); 
	$sdg=mysql_fetch_array($rert);

	?>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<link href="css/styles.css" rel="stylesheet" type="text/css" />
	<link href="css/style2.css" rel="stylesheet" type="text/css" />
</head>

<body>

	<!--header-->
	<?php include("common/header.php");?>
	<!--header end-->
	<div id="sub_nav">

		<div id="subnav_wrap" class="container_12">
			<div id="subnav" class=" grid_12">

				<ul>
					<li> <a href="dongtai.php?path=1" <?php if ($_GET[path]==1) {echo "class='sub_nav_active'";} ?>> 卖吧 </a></li>
					<li> <a href="dongtai.php?path=2" <?php if ($_GET[path]==2) {echo "class='sub_nav_active'";} ?>> 买吧 </a></li>
					<li> <a href="dongtai.php?path=3" <?php if ($_GET[path]==3) {echo "class='sub_nav_active'";} ?>> 聊吧 </a></li>
				</ul>

			</div>

		</div>



	</div>
	<!-- end sub_nav -->
	<div class="container_12">
	<form action="?del=ok&id=<?php echo $_GET[id]; ?>" method="post">
<!-- 		<table width="100%" border="1">
			<tr>
				<td><input type="checkbox" name="checkbox" id="checkbox" class="checkall" /><label for="checkbox"></label></td>
			</tr>
		</table> -->



		<!--个人详情-->
		<div class="cy_mode">
			<span style="gray;">标题:</span>
			<span class="conf-r">
				<?php echo $sdg[title];?>
			</span>
			<br/>
			<div class="all_fr conf_wd">
				<?php echo $sdg[addtime];?>&nbsp;&nbsp;<?php echo $sdg[viewnumber],"人阅读";?>


			</div>

		</div>
		<!--个人详情 end-->

		<!--内容区-->
		<div  id="content"  class="cy_body" style="margin-bottom:80px;">
			<span style="gray;">社区内容:</span><span style="color:red;"><?php echo $sdg[content];?></span>
			<?php  $ime=$sdg[images];
			$de=explode("," ,$ime);
			?>


			<p><img src="<?php echo $de[0];?>" width="15%"> </p>


			<?php

			$count3=mysql_query("select count(*) from reply where talkid='".$_GET['id']."' ");


//获得记录总数
			$rs3=mysql_fetch_array($count3); 
			$total4=$rs3[0];?>
			<br/>
			<?php echo $total4;?>条评论
			<a name="top" id="top"></a>
			<?php 

			$rert1=mysql_query("select * from reply where talkid='".$_GET['id']."' order by id desc limit 0,10"); 

			while($sdg1=mysql_fetch_array($rert1))
			{
				$rert2=mysql_query("select * from user where  userid='".$sdg1['userid']."'"); 
				$user=mysql_fetch_array($rert2);

				$des="回复".$user[niname];

				?>

				<div class="cy_mode" onclick="dissssd('<?php echo $des;?>')">

					<span style="color:#E91D55;" ><?php echo $user[niname];?></span><?php echo $sdg1[remind];?>：<?php echo $sdg1[content];?>

				</div>

				<?php } ?>




			</div>
			<!--内容区 end-->  
			<div class="grid_12">

				<div class="clearfix"><input name="" type="submit"  value="删除选中" /></div>



				<ul id="pagination">
					<?php  

					if ($page > 1) { //上一页 ?>
					<li><a     href="?page=1&state=<?php echo $_REQUEST[state]; ?>">首页</a></li>
					<li><a     href="?page=<?php echo ($page-1); ?>&state=<?php echo $_REQUEST[state]; ?>">上一页</a></li>
					<?php }?>

					<li class="active"><?php echo $page;?></li>

					<?php



					if ($_GET[page]!=$totalPage) { //下一页 ?>
					<li><a     href="?page=<?php echo ($page+1); ?>&state=<?php echo $_REQUEST[state]; ?>">下一页</a></li>
					<?php }

					if ($totalPage>1) { //下一页 ?>
					<li><a     href="?page=<?php echo $totalPage; ?>&state=<?php echo $_REQUEST[state]; ?>">尾页</a></li>

					<?php }?>

					总共有<?php echo $totalNumber;?>结果 

				</ul>
			</div>           
		</div>

	</form>
	</div>
</body>
</html>
